const { defineConfig } = require('@vue/cli-service')
// elementui导入
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')

module.exports = defineConfig({
  
  transpileDependencies: true,
  // 配置
  lintOnSave: true,//设置是否在开发环境下每次保存代码时都启用 eslint验证

  css:{
    // css预置项配置
    loaderOptions:{
      scss:{
        // 注意地址后加“;”
        additionalData:`@import "./src/styles/style.scss";`
      }
    }
  },

  // element导入
  configureWebpack: {
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver()],
      }),
      Components({
        resolvers: [ElementPlusResolver()],
      }),
    ]
  }
})
